<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>动画过渡属性</title>
  <style>
    div {
      width: 200px;
      height: 50px;
      background: yellow;
      border: 1px solid gray;
    }

    div ul {
      /* display: none; */
      margin-top: 50px;
      transition: all 1s;
      height: 0px;
      overflow: hidden;
    }

    div:hover ul {
      height: 200px;
      /* display: block; */
    }

    /*动画对 display:none /block 属性无效果。 */
  </style>
</head>

<body>
  <div>
    我的菜单
    <ul>
      <li>11111</li>
      <li>22222</li>
      <li>33333</li>
      <li>44444</li>
      <li>55555</li>
    </ul>
  </div>
</body>

</html>